﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExamSystem.Mdeol;
using ExamSystem.BLL;
namespace ExamSystem.ht
{
    public partial class TPager_Info : System.Web.UI.Page
    {
        TquestionBLL tt = new TquestionBLL();
        TstudentBLL ts = new TstudentBLL();
        TpagerBLL tb = new TpagerBLL();
       
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if(!Page.IsPostBack)
            {
                string id=Request.QueryString["id"];
                Tpager tp = tb.selecttpid(int.Parse(id));
                if(tp!=null)
                {
                    this.lbTpName.InnerText = tp.TpName;
                    this.lbTpScore.InnerText = tp.Tpscore + "";
                    this.lbTpCount.InnerText = tp.Tpcount + "";
                    //学生
                    List<Tstudent> stulist = ts.selectpager(int.Parse(id));
                    this.Repeater1.DataSource = stulist;
                    this.Repeater1.DataBind();
                    this.lbTsCount.InnerText = stulist.Count + "";

                    //试题
                    List<Tquestion> tqulist = tt.selecttpger(int.Parse(id));
                    this.Repeater2.DataSource = tqulist;
                    this.Repeater2.DataBind();
                    this.lbTpCount.InnerText = tqulist.Count + "";
                }
                
            }
        }

    }
}